package gui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;


public class ManualPanel extends JPanel{
	
private static final long serialVersionUID = -8860204251354754377L;

	private JScrollPane manualScroller;
	private JTextArea manualText;
	private JButton zurueck;
	
	public ManualPanel(){
		this.setSize(800,600);
		GridBagLayout thisLayout = new GridBagLayout();
		this.setLayout(thisLayout);
		thisLayout.rowWeights = new double[] {0.1, 0.1, 0.1, 0.1};
		thisLayout.rowHeights = new int[] {7, 7, 7, 7};
		thisLayout.columnWeights = new double[] {0.1, 0.1, 0.1, 0.1};
		thisLayout.columnWidths = new int[] {7, 7, 7, 7};

		zurueck = new JButton("Zurueck");
		this.add(zurueck, new GridBagConstraints(3, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
		zurueck.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				GUIController.getInstance().switchManualToStart();
				
			}});

		
		manualScroller = new JScrollPane();
		manualText = new JTextArea();
		manualScroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
		manualScroller.setViewportView(manualText);
		manualText.setText("			Hier steht irgendwann mal die Beschreibung		");
		manualText.setEditable(false);
		manualText.setPreferredSize(new java.awt.Dimension(419, 288));
		this.add(manualScroller, new GridBagConstraints(0, 0, 4, 3, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			
				
			
	}	
		
}
